attribute vec4 colorIn;
void main()                                                            
{                                                                      
  float pointSize = 500.0 * gl_Point.size;                           
  vec4 vert = gl_Vertex;
  vert.w = 1.0;
  vec3 pos_eye = vec3 (gl_ModelViewMatrix * vert);                   
  gl_PointSize = max(40.0, pointSize / (1.0 - pos_eye.z));            
  if(length(colorIn.xyz)<0.001)
    gl_PointSize=0.0;
  gl_TexCoord[0] = gl_MultiTexCoord0;                                
  gl_Position = ftransform();                                        
  gl_FrontColor = gl_Color;                                          
  gl_FrontSecondaryColor = vec4(colorIn.xyz,1.0);                        
}      
